﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 飞机大战
{
    internal class Shell : Game
    {
        public Shell(int x, int y, int width, int height, Image[] images, int speed, State state) : base(x, y, width, height, images, speed, state)
        {
        }

        //画飞机炮弹
        public override void Draw(Graphics g)
        {
            switch(this.State)
            {
                case State.MyPlane:
                    this.Y -= this.Speed;
                    break;
                case State.EnemyPlane:
                    this.Y += this.Speed;
                    break;
            }
            g.DrawImage(Images[1], this.X, this.Y, this.Width, this.Height);
        }
    }
}
